<!DOCTYPE HTML>
<html lang="<?=LANG?>">
    <head>
        <meta charset="UTF-8" />
        <meta name="generator" content="socially" />
        <title><?=$data->TITLE?></title>
        <meta name="description" content="<?=strip_tags($data->DESCRIPTION)?>" />
        <meta name="keywords" content="<?=$data->KEYWORDS?>" />
        <meta name="robots" content="index,follow" />
        <meta name="google-site-verification" content="<?=WEBMASTER?>" />
        <link rel="shortcut icon" href="http://<?=COOKIELESS?>/favicon.ico" type="image/x-icon" />
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
        <script src="http://<?=COOKIELESS?>/<?=$data->JS?>"></script>
        <link rel="stylesheet" href="http://<?=COOKIELESS?>/<?=$data->CSS?>" type="text/css" />
    </head>
    <body>
        <div id="result"></div>
        <div id="degade">
            <div id="site">
                <header>
                    <a id="logo" href="/"><img src="http://<?=COOKIELESS?>/logo.png" alt="<?=$data->TITLE?>" /></a>
                    <?/*if($data->account->stat):?>
                    <a id="stat" href="/search/online"><?=$data->account->stat?></a>
                    <?endif;*/?>
                    <div id="languages">
                        <?
                        if(MULTILANGUAGE && $data->LANGUAGES) foreach ($data->LANGUAGES as $k=>$i): ?>
                        <a href="/<?=$k?>" <?=LANG==$k?'class="selected"':''?> title="<?=$i?>"><?=$k?></a>
                        <?endforeach;?>
                    </div>
                </header>
                <div class="clear"></div>
                <nav>
                    <ol><? @include 'apps/account/template/_member.html'; ?></ol>
                    <ul><? if($data->APPS) foreach ($data->APPS as $i) @include 'apps/'.$i.'/template/_navigator.html'; ?></ul>
                    <div class="clear"></div>
                </nav>
                <div class="clear"></div>
                <div id="page">
                    <div id="guide">
                        <?if($data->guide) foreach($data->guide as $i):?>
                        <div class="<?=$i->class?>"><?=$i->message?></div>
                        <?endforeach;?>
                        <div class="clear"></div>
                    </div>
                    <? include 'apps/common/trunk/template.php'; ?>
                    <div class="clear"></div>
                </div>
                <div class="clear"></div>
                <?if(ACCESS):?>
                <div id="map">
                    <div id="mapContainer">
                        <? if($data->APPS) foreach ($data->APPS as $i) @include 'apps/'.$i.'/template/_map.html'; ?>
                    </div>
                </div>
                <?endif;?>
                <footer>
                    <span><?=$data->COPYRIGHT?></span>
                    <div class="foolinks"><? if($data->APPS) foreach ($data->APPS as $i) @include 'apps/'.$i.'/template/_footer.html'; ?></div>
                    <div class="clear"></div>
                    <a id="developer" href="http://gokercebeci.com" title="goker.cebeci">
                        developed by goker.cebeci
                    </a>
                    <div id="footnote">
                        <?=$data->FOONOTE?>
                        <div class="clear"></div>
                    </div>
                </footer>
                <?
                // DEBUG
                if(ACCESS >= DEBUG) common::debug($data); ?>
            </div>
        </div>
        <div id="bubbles"></div>
        <div id="listener"></div>
        <script>
            tool.listener('/listener');
            //tool.ping('/json/<?=LANG?>/account/ping');
                <?if(ANALYTICS && $_SERVER['REMOTE_ADDR'] != '127.0.0.1'):?>
                var _gaq = _gaq || [];
            _gaq.push(['_setAccount', '<?=ANALYTICS?>']);
            _gaq.push(['_setDomainName', '.<?=DOMAIN?>']);
            _gaq.push(['_trackPageview']);
            (function() {
                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
            })();
                <?endif;?>
        </script>
    </body>
</html>
